package com.gitee.jdbc.elasticsearch;

import java.util.Properties;

public class Constants {

  // statics
  public static final int ES_MAJOR_VERSION = 2;
  public static final int ES_MINOR_VERSION = 1;

  // defaults
  private static final String USE_HTTPS = "false";

  // property keys
  public static final String PROP_USE_HTTPS = "useHttps";

  public static String getLoggingInfo() {
    StackTraceElement element = Thread.currentThread().getStackTrace()[2];
    return element.getClassName() + "." + element.getMethodName() + " [" + element.getLineNumber() + "]";
  }

  public static Properties defaultProps() {
    Properties defaults = new Properties();
    defaults.put(PROP_USE_HTTPS, USE_HTTPS);
    return defaults;
  }

}
